feat(union-types): adds support for OneOf and AnyOf#41
Merged
Conversation
…g with unit tests
…atic/core-lib-python into add-type-combinator-support
…lause for deserialize method in oneOf and anyOf classes
…atic/core-lib-python into add-type-combinator-support
…atic/core-lib-python into add-type-combinator-support
…able cases at OneOf/AnyOf level
sufyankhanrao
commented
Jun 1, 2023
…improve coverage and ignored some functions coverage calculation
…atic/core-lib-python into add-type-combinator-support
…atic/core-lib-python into add-type-combinator-support
…atic/core-lib-python into add-type-combinator-support
asadali214
reviewed
Jun 7, 2023
asadali214
reviewed
Jun 7, 2023
asadali214
previously approved these changes
Jun 7, 2023
asadali214
left a comment
Contributor
There was a problem hiding this comment.
These changes looks good to me, I have only added 2 questions
added 2 commits
June 8, 2023 07:20
…atic/core-lib-python into add-type-combinator-support # Conflicts: # tests/apimatic_core/type_combinator_tests/test_one_of.py
…ed unreachable code from union_type_helper.
MaryamAdnan3
suggested changes
Jun 9, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for union-types that are OneOf and AnyOf types. There are 4 new classes (OneOf, AnyOf, LeafType, UnionTypeContext) that are participating as generic algorithms for validating requests and responses containing union-types. You can read more about union-types from here. By using those classes, Python core library now has the handling for union types. This also adds support for the serialization of nested maps and arrays.
closes #38